<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*" %>

<html>
<head>
    <title>消息展示</title>
</head>
<body>
<h1>消息列表</h1>

<%
    @SuppressWarnings("unchecked")
    List<String> messages = (List<String>) request.getAttribute("messages");
    if (messages != null && !messages.isEmpty()) {
        for (String message : messages) {
            out.println("<p>" + message + "</p>" + "<br>"); // 使用 println
        }
    } else {
        out.println("<p>没有消息记录。</p>");
    }
%>

<a href="login.jsp">返回登录</a>
</body>
</html>